package com.qf.nacos.config;


import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import org.springframework.context.annotation.Configuration;

import javax.servlet.http.HttpServletRequest;

@Configuration
public class BlackAndWhiteNames implements RequestOriginParser {

    @Override
    public String parseOrigin(HttpServletRequest request) {
        String ipAddress = request.getRemoteAddr();
        return ipAddress;
    }
}
